package com.project.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.project.bean.LogBean;
import com.project.mapper.ILogMapper;
import com.project.service.ILogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;

@Service
public class LogServiceImpl implements ILogService {
    @Autowired
    private ILogMapper logMapper;

    @Override
    public PageInfo<LogBean> findByDate(int pageNO, LocalDate startDate, LocalDate endDate) {
        PageHelper.startPage(pageNO,PAGE_SiZE);
        PageInfo<LogBean> info = PageInfo.of(logMapper.findByDate(startDate,endDate));
        return info;
    }
}
